package protocol.registration;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

import helpers.Client;

public class ServerRegistrationResponse {

	private Client[] m_ourClients;
	private Client[] m_theirClients;
	private int m_nrOurClients;
	private int m_nrTheirClients;
	
	public void read(DataInputStream dis) throws IOException
	{
		m_nrOurClients = dis.readInt();
		
		m_ourClients = new Client[m_nrOurClients];
		
		for( int  i = 0 ; i < m_nrOurClients; i++)
			m_ourClients[i] = new Client(dis);
		
		m_nrTheirClients = dis.readInt();
		
		m_theirClients = new Client[m_nrTheirClients];
		
		for( int i = 0  ; i < m_nrTheirClients; i++)
			m_theirClients[i] = new Client(dis);
	}
	
	public Client[]  getOurClients()
	{
		return m_ourClients;
	}
	
	public Client[] getTheirClients()
	{
		return m_theirClients;
	}
}
